#version 320 es

layout (location = 0) in vec3 inPos;
layout (location = 1) in vec3 inNor;
layout (location = 2) in vec2 inUV;
layout (location = 3) uniform mat4 CameraVPMatrix;
layout (location = 4) uniform mat4 ModelMatrix;

struct VSOut
{
    vec3 nor_vec;
    vec3 w_pos;
    vec2 uv;
};

out VSOut vsout;

void main()
{
    gl_Position = CameraVPMatrix * ModelMatrix * vec4(inPos, 1.0);
    vsout.nor_vec = inNor;
    highp vec4 world_pos = ModelMatrix * vec4(inPos, 1.0);
    vsout.w_pos = world_pos.xyz;
    vsout.uv = inUV;
}